package com.cloud.mapper;


import com.cloud.dto.CloudLogRecordReqQuery;
import com.cloud.entity.CloudLogRecord;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CloudLogRecordMapper {

    @Options(keyProperty = "id", keyColumn = "id", useGeneratedKeys = true)
    void saveBatchLog(@Param("cloudLogRecordList") List<CloudLogRecord> cloudLogRecordList, @Param("tableName") String tablename);

    void createTableIfAbsent(@Param("tableName") String tablename);

    List<CloudLogRecord> getCloudLogRecordPage(@Param("cloudLogRecordReqQuery") CloudLogRecordReqQuery cloudLogRecordReqQuery, @Param("tableName") String tablename);

    List<CloudLogRecord> selectAllById(@Param("tableName") String tableName, @Param("startId") Long startId, @Param("endId") Long endId);

    CloudLogRecord getMaxId(@Param("tableName") String tableName);
}
